package cn.tedu.ha;

import java.math.BigDecimal;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Scanner;

public class Test1 {
    public static void main(String[] args) throws ParseException {
        method();
        method2();
    }public static  void method() throws ParseException {
        Date a=new Date();
       SimpleDateFormat s=new SimpleDateFormat("yyyy-MM-dd");
        String c=s.format(a);
        System.out.println(c);

        String d="2015-10-26";
        Date e=s.parse(d);
        System.out.println(e);
    }
    public static void method2() throws ParseException {
        String a=new Scanner(System.in).nextLine();
        SimpleDateFormat s=new SimpleDateFormat("yyyy-MM-dd");
        Date b=s.parse(a);
        long start=b.getTime();
        long end=System.currentTimeMillis();
        System.out.println(end-start);
    }
}
